4187c1c7IWmBinGdI19kL4MuZ6RLbQ docs/check_pkgs
3f9e7d60PWZJeVh5xdnk0nLUdxlqEA docs/figs/xenlogo.eps
418a3248xjIqmNKo0v_XQSfAvlBGFw docs/html.sty
+41c0c4116itF389v0CEWcmzue6zJkA docs/misc/VMX_changes.txt
4022a73cgxX1ryj1HgS-IwwB6NUi2A docs/misc/XenDebugger-HOWTO
412f4bd9sm5mCQ8BkrgKcAKZGadq7Q docs/misc/blkif-drivers-explained.txt
+420b949cy9ZGzED74Fz_DaWlK7tT4g docs/misc/crashdb.txt
+4251a1f82AexscYEiF4Iku8Gc_kWfQ docs/misc/grant-tables.txt
+ 424d462b5GuApQ_NyMsRFt9LbrsWow docs/misc/sedf_scheduler_mini-HOWTO.txt
40d6ccbfKKBq8jE0ula4eHEzBiQuDA docs/misc/xen_config.html
410a4c2bAO_m_l4RsiiPHnZ4ixHWbQ docs/misc/xend.tex
3f9e7d564bWFB-Czjv1qdmE6o0GqNg docs/src/interface.tex
41cc934aO1m6NxEh_8eDr9bJIMoLFA tools/libxc/xc_plan9_build.c
3fbba6dctWRWlFJkYb6hdix2X4WMuw tools/libxc/xc_private.c
3fbba6dcbVrG2hPzEzwdeV_UC8kydQ tools/libxc/xc_private.h
-40589968UQFnJeOMn8UIFLbXBuwXjw tools/libxc/xc_rrobin.c
+42337174PxyzzPk62raDiYCIsfStDg tools/libxc/xc_ptrace.c
+ 41ebbfe9U0b0kI-HgjK7VEY4EvW7_w tools/libxc/xc_sedf.c
+41dde8b0pLfAKMs_L9Uri2hnzHiCRQ tools/libxc/xc_vmx_build.c
40e1b09dMYB4ItGCqcMIzirdMd9I-w tools/libxutil/Makefile
40e033325Sjqs-_4TuzeUEprP_gYFg tools/libxutil/allocate.c
40e03332KYz7o1bn2MG_KPbBlyoIMA tools/libxutil/allocate.h
3e54c38dkHAev597bPr71-hGzTdocg xen/common/perfc.c
4051bcecFeq4DE70p4zGO5setf47CA xen/common/physdev.c
3ddb79bdHqdQpATqC0rmUZNbsb6L6A xen/common/resource.c
-4064773cJ31vZt-zhbSoxqft1Jaw0w xen/common/sched_atropos.c
40589968dD2D1aejwSOvrROg7fOvGQ xen/common/sched_bvt.c
-40589968be_t_n0-w6ggceW7h-sx0w xen/common/sched_rrobin.c
+ 41ebbfe9oF1BF3cH5v7yE3eOL9uPbA xen/common/sched_sedf.c
3e397e6619PgAfBbw2XFbXkewvUWgw xen/common/schedule.c
-3ddb79bdB9RNMnkQnUyZ5C9hhMSQQw xen/common/slab.c
3ddb79bd0gVQYmL2zvuJnldvD0AGxQ xen/common/softirq.c
3e7f358awXBC3Vw-wFRwPw18qL1khg xen/common/string.c
403a3edbejm33XLTGMuinKEwQBrOIg xen/common/trace.c
INCLUDES += -I $(XEN_LIBXUTIL)
SRCS :=
-SRCS += xc_atropos.c
+ SRCS += xc_sedf.c
SRCS += xc_bvtsched.c
SRCS += xc_domain.c
SRCS += xc_evtchn.c
long long *warpl,
long long *warpu);
-int xc_atropos_domain_set(int xc_handle,
- u32 domid,
- u64 period, u64 slice, u64 latency,
- int xtratime);
-
-int xc_atropos_domain_get(int xc_handle,
- u32 domid,
- u64* period, u64 *slice, u64 *latency,
- int *xtratime);
-
-int xc_rrobin_global_set(int xc_handle, u64 slice);
-
-int xc_rrobin_global_get(int xc_handle, u64 *slice);
-
+ int xc_sedf_domain_set(int xc_handle,
+ u32 domid,
+ u64 period, u64 slice, u64 latency, u16 extratime, u16 weight);
+
+ int xc_sedf_domain_get(int xc_handle,
+ u32 domid,
+ u64* period, u64 *slice, u64 *latency, u16 *extratime, u16* weight);
+
typedef evtchn_status_t xc_evtchn_status_t;
-/*\
+/*
* EVENT CHANNEL FUNCTIONS
-\*/
+ */
/**
* This function allocates an unbound port. Ports are named endpoints used for
"cpu_khz", info.cpu_khz);
}
-static PyObject *pyxc_atropos_domain_set(PyObject *self,
- PyObject *args,
- PyObject *kwds)
-{
- XcObject *xc = (XcObject *)self;
- u32 domid;
- u64 period, slice, latency;
- int xtratime;
-
- static char *kwd_list[] = { "dom", "period", "slice", "latency",
- "xtratime", NULL };
-
- if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLi", kwd_list, &domid,
- &period, &slice, &latency, &xtratime) )
- return NULL;
-
- if ( xc_atropos_domain_set(xc->xc_handle, domid, period, slice,
- latency, xtratime) != 0 )
- return PyErr_SetFromErrno(xc_error);
-
- Py_INCREF(zero);
- return zero;
-}
-
-static PyObject *pyxc_atropos_domain_get(PyObject *self,
- PyObject *args,
- PyObject *kwds)
-{
- XcObject *xc = (XcObject *)self;
- u32 domid;
- u64 period, slice, latency;
- int xtratime;
-
- static char *kwd_list[] = { "dom", NULL };
-
- if( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &domid) )
- return NULL;
-
- if ( xc_atropos_domain_get( xc->xc_handle, domid, &period,
- &slice, &latency, &xtratime ) )
- return PyErr_SetFromErrno(xc_error);
-
- return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i}",
- "domain", domid,
- "period", period,
- "slice", slice,
- "latency", latency,
- "xtratime", xtratime);
-}
-
-
-static PyObject *pyxc_rrobin_global_set(PyObject *self,
- PyObject *args,
- PyObject *kwds)
-{
- XcObject *xc = (XcObject *)self;
- u64 slice;
-
- static char *kwd_list[] = { "slice", NULL };
-
- if( !PyArg_ParseTupleAndKeywords(args, kwds, "L", kwd_list, &slice) )
- return NULL;
-
- if ( xc_rrobin_global_set(xc->xc_handle, slice) != 0 )
- return PyErr_SetFromErrno(xc_error);
-
- Py_INCREF(zero);
- return zero;
-}
-
+ static PyObject *pyxc_sedf_domain_set(PyObject *self,
+ PyObject *args,
+ PyObject *kwds)
+ {
+ XcObject *xc = (XcObject *)self;
+ u32 domid;
+ u64 period, slice, latency;
+ u16 extratime, weight;
+ static char *kwd_list[] = { "dom", "period", "slice", "latency", "extratime", "weight",NULL };
+
+ if( !PyArg_ParseTupleAndKeywords(args, kwds, "iLLLhh", kwd_list, &domid,
+ &period, &slice, &latency, &extratime, &weight) )
+ return NULL;
+ if ( xc_sedf_domain_set(xc->xc_handle, domid, period, slice, latency, extratime,weight) != 0 )
+ return PyErr_SetFromErrno(xc_error);
+
+ Py_INCREF(zero);
+ return zero;
+ }
+
+ static PyObject *pyxc_sedf_domain_get(PyObject *self,
+ PyObject *args,
+ PyObject *kwds)
+ {
+ XcObject *xc = (XcObject *)self;
+ u32 domid;
+ u64 period, slice,latency;
+ u16 weight, extratime;
+
+ static char *kwd_list[] = { "dom", NULL };
+
+ if( !PyArg_ParseTupleAndKeywords(args, kwds, "i", kwd_list, &domid) )
+ return NULL;
+
+ if ( xc_sedf_domain_get( xc->xc_handle, domid, &period,
+ &slice,&latency,&extratime,&weight) )
+ return PyErr_SetFromErrno(xc_error);
+
+ return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i}",
+ "domain", domid,
+ "period", period,
+ "slice", slice,
+ "latency", latency,
+ "extratime", extratime);
+ }
+
static PyObject *pyxc_shadow_control(PyObject *self,
PyObject *args,
PyObject *kwds)
" warpu [long]: Unwarp requirement.\n"
" warpl [long]: Warp limit,\n"
},
-
- { "atropos_domain_set",
- (PyCFunction)pyxc_atropos_domain_set,
- METH_KEYWORDS, "\n"
- "Set the scheduling parameters for a domain when running with Atropos.\n"
- " dom [int]: domain to set\n"
- " period [long]: domain's scheduling period\n"
- " slice [long]: domain's slice per period\n"
- " latency [long]: wakeup latency hint\n"
- " xtratime [int]: boolean\n"
- "Returns: [int] 0 on success; -1 on error.\n" },
-
- { "atropos_domain_get",
- (PyCFunction)pyxc_atropos_domain_get,
- METH_KEYWORDS, "\n"
- "Get the current scheduling parameters for a domain when running with\n"
- "the Atropos scheduler."
- " dom [int]: domain to query\n"
- "Returns: [dict]\n"
- " domain [int]: domain ID\n"
- " period [long]: scheduler period\n"
- " slice [long]: CPU reservation per period\n"
- " latency [long]: unblocking latency hint\n"
- " xtratime [int] : 0 if not using slack time, nonzero otherwise\n" },
-
- { "rrobin_global_set",
- (PyCFunction)pyxc_rrobin_global_set,
- METH_KEYWORDS, "\n"
- "Set Round Robin scheduler slice.\n"
- " slice [long]: Round Robin scheduler slice\n"
- "Returns: [int] 0 on success, throws an exception on failure\n" },
-
- { "rrobin_global_get",
- (PyCFunction)pyxc_rrobin_global_get,
- METH_KEYWORDS, "\n"
- "Get Round Robin scheduler settings\n"
- "Returns [dict]:\n"
- " slice [long]: Scheduler time slice.\n" },
+
+ { "sedf_domain_set",
+ (PyCFunction)pyxc_sedf_domain_set,
+ METH_KEYWORDS, "\n"
+ "Set the scheduling parameters for a domain when running with Atropos.\n"
+ " dom [int]: domain to set\n"
+ " period [long]: domain's scheduling period\n"
+ " slice [long]: domain's slice per period\n"
+ " latency [long]: domain's wakeup latency hint\n"
+ " extratime [int]: domain aware of extratime?\n"
+ "Returns: [int] 0 on success; -1 on error.\n" },
+
+ { "sedf_domain_get",
+ (PyCFunction)pyxc_sedf_domain_get,
+ METH_KEYWORDS, "\n"
+ "Get the current scheduling parameters for a domain when running with\n"
+ "the Atropos scheduler."
+ " dom [int]: domain to query\n"
+ "Returns: [dict]\n"
+ " domain [int]: domain ID\n"
+ " period [long]: scheduler period\n"
+ " slice [long]: CPU reservation per period\n"
+ " latency [long]: domain's wakeup latency hint\n"
+ " extratime [int]: domain aware of extratime?\n"},
{ "evtchn_alloc_unbound",
(PyCFunction)pyxc_evtchn_alloc_unbound,
'warpl' : warpl,
'warpu' : warpu })
- def xend_domain_cpu_atropos_set(self, id, period, slice, latency, xtratime):
- return self.xendPost(self.domainurl(id),
- {'op' : 'cpu_atropos_set',
- 'period' : period,
- 'slice' : slice,
- 'latency' : latency,
- 'xtratime': xtratime })
-
+ def xend_domain_cpu_sedf_set(self, id, period, slice, latency, extratime, weight):
+ return self.xendPost(self.domainurl(id),
+ {'op' : 'cpu_sedf_set',
+ 'period' : period,
+ 'slice' : slice,
+ 'latency' : latency,
+ 'extratime' : extratime,
+ 'weight' : weight })
+
def xend_domain_maxmem_set(self, id, memory):
return self.xendPost(self.domainurl(id),
{ 'op' : 'maxmem_set',
except Exception, ex:
raise XendError(str(ex))
- def domain_cpu_atropos_set(self, id, period, slice, latency, xtratime):
- """Set Atropos scheduler parameters for a domain.
- """
- dominfo = self.domain_lookup(id)
- try:
- return xc.atropos_domain_set(dominfo.dom, period, slice, latency, xtratime)
- except Exception, ex:
- raise XendError(str(ex))
-
- def domain_cpu_atropos_get(self, id):
- """Get Atropos scheduler parameters for a domain.
- """
- dominfo = self.domain_lookup(id)
- try:
- return xc.atropos_domain_get(dominfo.dom)
- except Exception, ex:
- raise XendError(str(ex))
+
+ def domain_cpu_sedf_set(self, id, period, slice, latency, extratime, weight):
+ """Set Simple EDF scheduler parameters for a domain.
+ """
+ dominfo = self.domain_lookup(id)
+ try:
+ return xc.sedf_domain_set(dominfo.dom, period, slice, latency, extratime, weight)
+ except Exception, ex:
+ raise XendError(str(ex))
+
+ def domain_cpu_sedf_get(self, id):
+ """Get Atropos scheduler parameters for a domain.
+ """
+ dominfo = self.domain_lookup(id)
+ try:
+ return xc.sedf_domain_get(dominfo.dom)
+ except Exception, ex:
+ raise XendError(str(ex))
-
def domain_device_create(self, id, devconfig):
"""Create a new device for a domain.
val = fn(req.args, {'dom': self.dom.id})
return val
- def op_cpu_atropos_set(self, op, req):
- fn = FormFn(self.xd.domain_cpu_atropos_set,
- [['dom', 'str'],
- ['period', 'int'],
- ['slice', 'int'],
- ['latency', 'int'],
- ['xtratime', 'int']])
- val = fn(req.args, {'dom': self.dom.id})
- return val
+
+ def op_cpu_sedf_set(self, op, req):
+ fn = FormFn(self.xd.domain_cpu_sedf_set,
+ [['dom', 'str'],
+ ['period', 'int'],
+ ['slice', 'int'],
+ ['latency', 'int'],
+ ['extratime', 'int'],
+ ['weight', 'int']])
+ val = fn(req.args, {'dom': self.dom.id})
+ return val
+
def op_maxmem_set(self, op, req):
fn = FormFn(self.xd.domain_maxmem_set,
[['dom', 'str'],
xm.prog(ProgBvtslice)
-
-class ProgAtropos(Prog):
- group = 'scheduler'
- name= "atropos"
- info = """Set atropos parameters."""
-
- def help(self, args):
- print args[0], "DOM PERIOD SLICE LATENCY XTRATIME"
- print "\nSet atropos parameters."
-
- def main(self, args):
- if len(args) != 6: self.err("%s: Invalid argument(s)" % args[0])
- dom = args[1]
- v = map(int, args[2:6])
- server.xend_domain_cpu_atropos_set(dom, *v)
-
-xm.prog(ProgAtropos)
-
-class ProgRrobin(Prog):
- group = 'scheduler'
- name = "rrobin"
- info = """Set round robin slice."""
-
- def help(self, args):
- print args[0], "SLICE"
- print "\nSet round robin scheduler slice."
-
- def main(self, args):
- if len(args) != 2: self.err("%s: Invalid argument(s)" % args[0])
- rrslice = int(args[1])
- server.xend_node_rrobin_set(rrslice)
-
-xm.prog(ProgRrobin)
-
+ class ProgSedf(Prog):
+ group = 'scheduler'
+ name= "sedf"
+ info = """Set simple EDF parameters."""
+
+ def help(self, args):
+ print args[0], "DOM PERIOD SLICE LATENCY EXTRATIME WEIGHT"
+ print "\nSet simple EDF parameters."
+
+ def main(self, args):
+ if len(args) != 7: self.err("%s: Invalid argument(s)" % args[0])
+ dom = args[1]
+ v = map(int, args[2:7])
+ server.xend_domain_cpu_sedf_set(dom, *v)
+
+ xm.prog(ProgSedf)
+
class ProgInfo(Prog):
group = 'host'
name = "info"
static char opt_sched[10] = "bvt";
string_param("sched", opt_sched);
+ /*#define WAKE_HISTO*/
+ /*#define BLOCKTIME_HISTO*/
+ /*#define ADV_SCHED_HISTO*/
+ //#include <xen/adv_sched_hist.h>
+
+ #if defined(WAKE_HISTO)
+ #define BUCKETS 31
+ #elif defined(BLOCKTIME_HISTO)
+ #define BUCKETS 200
+ #endif
+
#define TIME_SLOP (s32)MICROSECS(50) /* allow time to slip a bit */
-/*
- * TODO MAW pull trace-related #defines out of here and into an auto-generated
- * header file later on!
- */
-#define TRC_SCHED_DOM_ADD 0x00010000
-#define TRC_SCHED_DOM_REM 0x00010001
-#define TRC_SCHED_WAKE 0x00010002
-#define TRC_SCHED_BLOCK 0x00010003
-#define TRC_SCHED_YIELD 0x00010004
-#define TRC_SCHED_SET_TIMER 0x00010005
-#define TRC_SCHED_CTL 0x00010006
-#define TRC_SCHED_ADJDOM 0x00010007
-#define TRC_SCHED_RESCHED 0x00010008
-#define TRC_SCHED_SWITCH 0x00010009
-#define TRC_SCHED_S_TIMER_FN 0x0001000A
-#define TRC_SCHED_T_TIMER_FN 0x0001000B
-#define TRC_SCHED_DOM_TIMER_FN 0x0001000C
-
/* Various timer handlers. */
static void s_timer_fn(unsigned long unused);
static void t_timer_fn(unsigned long unused);
static void dom_timer_fn(unsigned long data);
/* This is global for now so that private implementations can reach it */
-schedule_data_t schedule_data[NR_CPUS];
+struct schedule_data schedule_data[NR_CPUS];
extern struct scheduler sched_bvt_def;
-extern struct scheduler sched_rrobin_def;
-extern struct scheduler sched_atropos_def;
+ extern struct scheduler sched_sedf_def;
static struct scheduler *schedulers[] = {
&sched_bvt_def,
- &sched_rrobin_def,
- &sched_atropos_def,
+ &sched_sedf_def,
NULL
};
/* Block the currently-executing domain until a pertinent event occurs. */
long do_block(void)
{
- ASSERT(current->id != IDLE_DOMAIN_ID);
- current->shared_info->vcpu_data[0].evtchn_upcall_mask = 0;
- set_bit(DF_BLOCKED, ¤t->flags);
- TRACE_2D(TRC_SCHED_BLOCK, current->id, current);
- __enter_scheduler();
+ struct exec_domain *ed = current;
+
+ #ifdef ADV_SCHED_HISTO
+ adv_sched_hist_start(current->processor);
+ #endif
+
+ ed->vcpu_info->evtchn_upcall_mask = 0;
+ set_bit(EDF_BLOCKED, &ed->ed_flags);
+
+ /* Check for events /after/ blocking: avoids wakeup waiting race. */
+ if ( event_pending(ed) )
+ clear_bit(EDF_BLOCKED, &ed->ed_flags);
+ else
+ {
+ TRACE_2D(TRC_SCHED_BLOCK, ed->domain->id, ed->eid);
+ __enter_scheduler();
+ }
+
return 0;
}
/* Voluntarily yield the processor for this allocation. */
static long do_yield(void)
{
- TRACE_2D(TRC_SCHED_YIELD, current->id, current);
+ #ifdef ADV_SCHED_HISTO
+ adv_sched_hist_start(current->processor);
+ #endif
+
+ TRACE_2D(TRC_SCHED_YIELD, current->domain->id, current->eid);
__enter_scheduler();
return 0;
}
spin_unlock_irq(&schedule_data[cpu].schedule_lock);
- if ( unlikely(prev == next) )
+ if ( unlikely(prev == next) ) {
+ #ifdef ADV_SCHED_HISTO
+ adv_sched_hist_to_stop(cpu);
+ #endif
return;
-
+ }
perfc_incrc(sched_ctx);
- cleanup_writable_pagetable(prev);
-
#if defined(WAKE_HISTO)
if ( !is_idle_task(next->domain) && next->wokenup ) {
ulong diff = (ulong)(now - next->wokenup);
}
#endif
- TRACE_2D(TRC_SCHED_SWITCH, next->id, next);
- switch_to(prev, next);
-
- /*
- * We do this late on because it doesn't need to be protected by the
- * schedule_lock, and because we want this to be the very last use of
- * 'prev' (after this point, a dying domain's info structure may be freed
- * without warning).
- */
- clear_bit(DF_RUNNING, &prev->flags);
+ prev->sleep_tick = schedule_data[cpu].tick;
/* Ensure that the domain has an up-to-date time base. */
- if ( !is_idle_task(next) && update_dom_time(next) )
- send_guest_virq(next, VIRQ_TIMER);
+ if ( !is_idle_task(next->domain) )
+ {
+ update_dom_time(next);
+ if ( next->sleep_tick != schedule_data[cpu].tick )
+ send_guest_virq(next, VIRQ_TIMER);
+ }
+ TRACE_4D(TRC_SCHED_SWITCH,
+ prev->domain->id, prev->eid,
+ next->domain->id, next->eid);
- schedule_tail(next);
+ #ifdef ADV_SCHED_HISTO
+ adv_sched_hist_to_stop(cpu);
+ #endif
- BUG();
+
+ context_switch(prev, next);
}
/* No locking needed -- pointer comparison is safe :-) */
* - dom_timer: per domain timer to specifiy timeout values
****************************************************************************/
-/* The scheduler timer: force a run through the scheduler*/
+/* The scheduler timer: force a run through the scheduler */
static void s_timer_fn(unsigned long unused)
{
- TRACE_0D(TRC_SCHED_S_TIMER_FN);
+ #ifdef ADV_SCHED_HISTO
+ adv_sched_hist_start(current->processor);
+ #endif
+
raise_softirq(SCHEDULE_SOFTIRQ);
perfc_incrc(sched_irq);
}
void print_sched_histo(unsigned char key) { }
void reset_sched_histo(unsigned char key) { }
#endif
+ #endif
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
#ifndef __XEN_PUBLIC_SCHED_CTL_H__
#define __XEN_PUBLIC_SCHED_CTL_H__
-/* Scheduler types */
+/* Scheduler types. */
#define SCHED_BVT 0
-#define SCHED_ATROPOS 2
-#define SCHED_RROBIN 3
+ #define SCHED_SEDF 4
-/* these describe the intended direction used for a scheduler control or domain
- * command */
+/* Set or get info? */
#define SCHED_INFO_PUT 0
#define SCHED_INFO_GET 1
struct sched_adjdom_cmd
{
- u32 sched_id;
- u32 direction;
- domid_t domain;
- union {
- struct bvt_adjdom {
- u32 mcu_adv; /* mcu advance: inverse of weight */
- u32 warpback; /* warp? */
- s32 warpvalue; /* warp value */
- long long warpl; /* warp limit */
- long long warpu; /* unwarp time requirement */
- } bvt;
- } u;
- };
+ u32 sched_id; /* 0 */
+ u32 direction; /* 4 */
+ domid_t domain; /* 8 */
+ u16 __pad0;
+ u32 __pad1;
+ union { /* 16 */
+ struct bvt_adjdom
+ {
+ u32 mcu_adv; /* 16: mcu advance: inverse of weight */
+ u32 warpback; /* 20: warp? */
+ s32 warpvalue; /* 24: warp value */
+ long long warpl; /* 32: warp limit */
+ long long warpu; /* 40: unwarp time requirement */
+ } PACKED bvt;
-
- struct atropos_adjdom
- {
- u64 nat_period; /* 16 */
- u64 nat_slice; /* 24 */
- u64 latency; /* 32 */
- u32 xtratime; /* 36 */
- } PACKED atropos;
+
+ struct sedf_adjdom
+ {
+ u64 period; /* 16 */
+ u64 slice; /* 24 */
+ u64 latency; /* 32 */
+ u16 extratime; /* 36 */
+ u16 weight; /* 38 */
+ } PACKED sedf;
+
+ } PACKED u;
+ } PACKED; /* 40 bytes */
#endif /* __XEN_PUBLIC_SCHED_CTL_H__ */
* Portions by Mark Williamson are (C) 2004 Intel Research Cambridge
*/
-typedef struct schedule_data_st
-{
- spinlock_t schedule_lock; /* spinlock protecting curr pointer
- TODO check this */
- struct domain *curr; /* current task */
- struct domain *idle; /* idle task for this cpu */
- void * sched_priv;
- struct ac_timer s_timer; /* scheduling timer */
+#ifndef __XEN_SCHED_IF_H__
+#define __XEN_SCHED_IF_H__
+
+ //#define ADV_SCHED_HISTO
+ #define BUCKETS 10
+ /*300*/
+
+struct schedule_data {
+ spinlock_t schedule_lock; /* spinlock protecting curr */
+ struct exec_domain *curr; /* current task */
+ struct exec_domain *idle; /* idle task for this cpu */
+ void *sched_priv;
+ struct ac_timer s_timer; /* scheduling timer */
+ unsigned long tick; /* current periodic 'tick' */
+ #ifdef ADV_SCHED_HISTO
+ u32 to_hist[BUCKETS];
+ u32 from_hist[BUCKETS];
+ u64 save_tsc;
+ #endif
#ifdef BUCKETS
u32 hist[BUCKETS]; /* for scheduler latency histogram */
#endif